package com.example.activitylifecycle;

import android.os.Bundle;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.i("MainActivity", "调用 onCreate()");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.i("MainActivity", "调用 onStart()");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.i("MainActivity", "调用 onResume()");
    }

    @Override
    protected void onPause(){
        super.onPause();
        Log.i("MainActivity", "调用 onPause()");
    }

    @Override
    protected void onStop(){
        super.onStop();
        Log.i("MainActivity", "调用 onStop()");
    }

    @Override
    protected void onDestroy(){
        super.onDestroy();
        Log.i("MainActivity", "调用 onDestroy()");
    }

    @Override
    protected void onRestart(){
        super.onRestart();
        Log.i("MainActivity", "调用 onRestart()");
    }
}